package lab01;
import java.sql.SQLOutput;
import java.text.ParseException;
import java.util.Date;
import java.util.Scanner;
import java.text.DateFormat;
import  java.text.SimpleDateFormat;
public class Excise02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入你的身份证号：");
        String string = scanner.nextLine();
        String year=string.substring(6,10);
        String month=string.substring(10,12);
        String day=string.substring(12,14);

        String birthday = year+"-"+month+"-"+day;
        DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
        Date date=null;
        try{
            date=fmt.parse(birthday);
            System.out.println(date);
        }catch (ParseException e){
            e.printStackTrace();
        }

    }
}
/*
      请输入你的身份证号：
      349192200512259798
      Sun Dec 25 00:00:00 CST 2005
 */